package cn.itlaobing.management.common;

/**
 * @author 马浩 1085473391@qq.com
 * @Package cn.itlaobing.management.common
 * @Description: TODO (  )
 * @Date 2019/4/8 15:13
 * @Version V1.0
 */
public class ResponseInfo {

    public int code = 1;
    public String msg = "success";
    public Object data = null;

    public static ResponseInfo ok(){
        return new ResponseInfo();
    }

    public static ResponseInfo error(){
        ResponseInfo info = new ResponseInfo();
        info.code = 0 ;
        info.msg = "error";
        return info;
    }
    public static ResponseInfo error(String msg){
        ResponseInfo info = new ResponseInfo();
        info.code = 0 ;
        info.msg = msg;
        return info;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
